---
title: Alert
description: Displays a callout for user attention.
kobalte: https://kobalte.dev/docs/core/components/alert
---

<ComponentPreview name="alert-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>

<TabsContent value="cli">

```bash
npx solidui-cli@latest add alert
```

</TabsContent>

<TabsContent value="manual">
<Steps>

<Step>Install the following dependencies: </Step>

```bash
pnpm install @kobalte/core
```

<Step>Copy and paste the following code into your project: </Step>

<ComponentSource name="alert" />

</Steps>
</TabsContent>

</Tabs>

## Usage

```tsx
import { Alert, AlertDescription, AlertTitle } from "~/components/ui/alert"
```

```tsx
<Alert>
  <Terminal class="h-4 w-4" />
  <AlertTitle>Heads up!</AlertTitle>
  <AlertDescription>
    You can add components and dependencies to your app using the cli.
  </AlertDescription>
</Alert>
```
